﻿@model tb_partner
@{
    ViewBag.Title = (Model.Id > 0 ? "修改" : "添加") + "友情链接";
    Layout = "~/Areas/Admin/Views/Shared/_RightLayout.cshtml";
}
<script src="@Url.Content("~/scripts/ckeditor/ckeditor.js")" type="text/javascript"></script>
<script src="@Url.Content("~/scripts/ckfinder/ckfinder.js")" type="text/javascript"></script>

	<form id="editForm" name="editForm" method="post" action="/Partner/Save/?id=@if(Model.Id > 0){ Write(Model.Id.ToString()); }">
	<div id="panelBar">
		<ul class="toolBar">
			<li><input class="submit" type="submit" value="保存" /></li>
			<li><a class="back" href="javascript:void(0)"><span>返回</span></a></li>
		</ul>
	</div>
	<div id="edit">
		<ul>
            <li> 
				<span class="label">名称：</span>
                <span >
                    <input id="name" name="name" type="text" value="@Model.name"  title="请输入" /> 
                </span>
			</li> 
            <li> 
				<span class="label">Logo：</span>
                <span >
                    <input id="logo" name="logo" type="text" value="@Model.logo"  title="请输入" /> 
                    <input type="button" value=" 浏 览 " onclick="BrowseServer('logo');" />
                    <script type="text/javascript">
                        function BrowseServer(inputId) {
                            var finder = new CKFinder();
                            finder.basePath = '/scripts/ckfinder/';
                            finder.selectActionFunction = SetFileField;
                            finder.selectActionData = inputId;
                            finder.startupPath = 'Images:images';
                            finder.resourceType = 'Images';
                            finder.popup();
                        }
                        function SetFileField(fileUrl, data) {
                            document.getElementById(data["selectActionData"]).value = fileUrl;
                        } 
                    </script>

                    Logo图片规格：90*50px
                </span>
			</li> 
            <li> 
				<span class="label">链接地址：</span>
                <span >
                    <input id="homepage" name="homepage" type="text" value="@Model.homepage"  title="请输入" /> 
                </span>
			</li> 
            <li> 
				<span class="label">类型：</span>
                <span >
                    <select name="Type">
                        <option @(Model.Type == 0 ? "selected" : "") value="0">参展商推荐</option>
                        <option @(Model.Type == 1 ? "selected" : "") value="1">推荐展品</option>
                        <option @(Model.Type == 2 ? "selected" : "") value="2">合作媒体</option>
                    </select>
                </span>
			</li> 
		</ul>
	</div>
	</form>
